import { exIcon, exSelect, exSwitch } from '@ve/common/components/extension'
const PAGEINFO = {
  _id: '', //页面id
  name: '', //页面名称
  type: 1, //1:page 2:dialog 3:pda新页面
  bgColor: '#fff',
  list: [], //图层页面list
  pageModules: [], //当前页面组件模块

  // 数据
  data: {},
  //交互
  interaction: [],
  //子页相关
  showSubPageId: '', //显示页面或者弹框id
  hasSubPageShow: false, //子页面或者子弹框是否显示
  subPage: {
    info: {},
    dialog: {},
    drawer: {
      direction: 'ltr',
      size: '30%',
    },
    //只对dialog有效
    dialogWidth: '800px',
    dialogHeight: '400px',
    clickToClose: false,
  },
}
const TABLEMENUINFO = {
  name: '菜单名称',
  type: 'TableMenu',
  code: [],
  children: [],
  extension: {
    icon: exIcon('图标选择器', ''),
    statusConfig: {
      type: 'exStatusConfig',
      name: '状态配置',
      value: [],
    },
  },
}
const COLUMNCONFIGINFO = {
  name: '配置名称',
  type: 'columnConfig',
  code: [],
  children: [],
  extension: {
    statusConfig: {
      type: 'exColumnStatusConfig',
      name: '状态配置',
      value: { target: '', color: '', textColor: '', borderColor: '', icon: '', iconColor: '', tagContent: '', tagType: '', conditionList: [] },
    },
  },
}
const TABLEOPERATEMENUINFO = {
  name: '按钮名称',
  type: 'TableOperateMenu',
  code: [],
  children: [],
  extension: {
    type: exSelect('颜色类型', '', [
      { value: '', label: '默认' },
      { value: 'text', label: '文字' },
      { value: 'primary', label: '蓝色' },
      { value: 'success', label: '绿色' },
      { value: 'info', label: '灰色' },
      { value: 'warning', label: '黄色' },
      { value: 'danger', label: '红色' },
    ]),
    round: exSwitch('圆角', false),
    circle: exSwitch('圆形', false),
    plain: exSwitch('朴素按钮', false),
    icon: exIcon('图标选择器', ''),
    statusConfig: {
      type: 'exStatusConfig',
      name: '状态配置',
      value: [],
    },
  },
}
export { PAGEINFO, TABLEMENUINFO, TABLEOPERATEMENUINFO, COLUMNCONFIGINFO }
